package cn.xd.itstack.springframework.beans.factory.support;

import cn.xd.itstack.springframework.beans.factory.config.BeanDefinition;

import java.lang.reflect.Constructor;

/**
 * @Classname InstantiationStrategy
 * @Description  动态代理策略模式
 * @Date 2022/5/11 下午4:52
 * @Created by lvxiaodong
 */
public interface InstantiationStrategy {
    /**
     *  实例化对象
     * @param beanDefinition
     * @param beanName
     * @param constructor  类信息，为了获取构造函数
     * @param args
     * @return
     */
    Object instantiate (BeanDefinition beanDefinition, String beanName, Constructor constructor, Object ...args);
}
